#
#	Makefile for oficonv/libsrc
#

@SET_MAKE@

SHELL = /bin/sh
VPATH = @srcdir@:@top_srcdir@/include:@top_srcdir@/@configdir@/include
srcdir = @srcdir@
top_srcdir = @top_srcdir@
configdir = @top_srcdir@/@configdir@

include $(configdir)/@common_makefile@

ofstddir = $(top_srcdir)/../ofstd

LOCALINCLUDES = -I$(ofstddir)/include
LIBDIRS =
LOCALLIBS =
LOCALDEFS =

objs = \
    citrus_bcs.o citrus_bcs_strtol.o citrus_bcs_strtoul.o citrus_big5.o citrus_csmapper.o   \
    citrus_db.o citrus_db_factory.o citrus_db_hash.o citrus_dechanyu.o citrus_esdb.o        \
    citrus_euc.o citrus_euctw.o citrus_gbk2k.o citrus_hash.o citrus_hz.o citrus_iconv.o     \
    citrus_iconv_none.o citrus_iconv_std.o citrus_iso2022.o citrus_jisx0208.o               \
    citrus_johab.o citrus_lookup.o citrus_lookup_factory.o citrus_mapper_646.o              \
    citrus_mapper.o citrus_mapper_none.o citrus_mapper_serial.o citrus_mapper_std.o         \
    citrus_mapper_zone.o citrus_memstream.o citrus_mmap.o citrus_module.o citrus_mskanji.o  \
    citrus_none.o citrus_pivot_factory.o citrus_prop.o citrus_stdenc.o citrus_ues.o         \
    citrus_utf1632.o citrus_utf7.o citrus_utf8.o citrus_viqr.o citrus_zw.o data_csmapper.o  \
    data_esdb.o oficonv_iconv.o oficonv_logger.o oficonv_strcasestr.o oficonv_strlcpy.o

library = liboficonv.$(LIBEXT)


all: $(library)


$(library): $(objs)
	$(AR) $(ARFLAGS) $@ $(objs)
	$(RANLIB) $@


install: $(library)
	$(configdir)/mkinstalldirs $(DESTDIR)$(libdir)
	$(INSTALL_DATA) $(library) $(DESTDIR)$(libdir)/$(library)
	$(RANLIB) $(DESTDIR)$(libdir)/$(library)


clean:
	rm -f $(support_progs) $(support_objs) $(objs) $(library) $(TRASH)

distclean: clean
	rm -f $(DISTTRASH)


dependencies:
	$(CXX) -MM $(defines) $(includes) $(CPPFLAGS) $(CXXFLAGS) *.c  > $(DEP)

include $(DEP)
